home *** CD-ROM | disk | FTP | other *** search
/ Amiga Mag HDD Backup / Amiga Mag HDD Backup.zip / Amiga Mag HDD Backup / Alexander.img.bin / Alexander.img / *********10.11 / AC 10.11 Archive.sit / ChestNet.ascii < prev    next >
Text File  |  1995-11-16  |  11KB  |  296 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7. Chest Net -- An Amiga based Neural Network for Radiology
  8.  
  9. Michael Tobin, M.D., Ph.D.
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.     I have been intrigued for some time by the possibility of 
  18. computers making medical diagnoses.  I also felt that the Amiga, 
  19. being the rather nifty little computer that it is, could handle the 
  20. challenge -- if given a little medical training, of course.
  21.  
  22.     I thought that the information density on a standard chest 
  23. radiograph was too much for a small personal computer to analyze.  
  24. So, I decided to take a different approach and describe to the Amiga 
  25. typical appearance of each of several chest diseases.  I then planned 
  26. to input data from an actual patient and ask for Amy's opinion as to 
  27. which disease it most closely resembled.
  28.  
  29.  
  30.  
  31.  
  32.  
  33. Neural Networks
  34.  
  35.     Neural networks are widely used for making predictions.  They are 
  36. therefore used in areas as diverse as financial markets, economics, 
  37. and even weather forecasting, to name just a few.  While not every 
  38. problem seems amenable to a neural network approach, the results can 
  39. be impressive for those that do.
  40.  
  41.     The neural network is essentially a "black box."  In its simplest 
  42. incarnation, a neural network has three layers.  You train it by 
  43. putting data into its Input Layer and telling it what the Output 
  44. Layer should be in each case by putting the "correct answer" in the  
  45. Target Layer.  The input data is presented over and over again until 
  46. the Output_Layer matches the Target Layer.  The neural network 
  47. achieves this goal by modifying a Hidden Layer, which sits between 
  48. the Input and Output layers and has connections with each cell in 
  49. both layers (Figure 1).  Training the network, then, involves 
  50. strengthening or weakening the connections to and from the Hidden 
  51. Layer.  Once trained, the network is tested by putting data from an 
  52. "unknown" into the Input Layer and reading the Output Layer for the 
  53. result.
  54.  
  55.  
  56.  
  57.  
  58.  
  59. But is it available on the Amiga?
  60.  
  61.  
  62.  
  63.     NeuroPro 2.0 has been available from MegageM since 1992.  It is a 
  64. three layer system, with a maximum of 256 inputs and outputs.  Valid 
  65. data would include small images, linear arrays of 256 pixels either 
  66. turned "on" or left "off" using a paint program, and ASCII text.  
  67. ASCII text is limited to 32 characters (8 bits per character) and 
  68. must be right justified to position 32.  To train the system, one 
  69. needs an Input file, a Target file (the "right answer," so to speak) 
  70. or a Pair file, with lines alternating between input data and target 
  71. data.  In my case, I decided to create Pair files with entries that
  72.  
  73. looked like
  74.  
  75.                100051110000111100000111100004011
  76.  
  77.                                     Tuberculosis
  78.  
  79.                222000111000822110000000000111003
  80.  
  81.                           CongestiveHeartFailure
  82.  
  83.                     etc
  84.  
  85. where each number in the 32 number string represents some feature of 
  86. the x-ray.
  87.  
  88.  
  89.  
  90.     After training the system by presenting the Input and the Target 
  91. data anywhere from 100 to 1000 times -- done automatically by the 
  92. program, one tests the network by giving it an Input file with 
  93. numbers hopefully similar enough to those the system was trained on 
  94. so that it will recognize them as belonging to one of the diseases 
  95. already in its list.
  96.  
  97.  
  98.  
  99. What did you say the 15th character meant?
  100.  
  101.  
  102.  
  103.     Well that's the point.  The 15th ASCII character may have meant 
  104. that the x-ray was that of an adult or maybe it meant that there was 
  105. a pneumonia in the left lung.  And good luck in not making a mistake 
  106. and putting what was supposed to be in the 15th slot into the 16th 
  107. one instead.  And who really would want to use the system on a 
  108. routine basis if one had to open a text editor and type in 32 
  109. characters while looking at a chart to see what everything meant.  
  110. What is needed is a good interface.
  111.  
  112.  
  113.  
  114. What is an Amiga user to do?
  115.  
  116.  
  117.  
  118.     First, I used Helm (Eagle Tree Software) to create an interface, 
  119. which I call Chest Net, filled with radio buttons and other types of 
  120. selectors so that when a user chooses, for example, the button 
  121. corresponding to "adult," a number is generated which corresponds to 
  122. that choice (Figure 2).  When the user is finished checking off the 
  123. boxes that describe an x-ray, the Chest Net uses Helm's scripting 
  124. language to "read" which buttons were checked for each option and 
  125. then uses AREXX to create a file with the corresponding numbers.  
  126. NeuroPro can then be launched from Chest Net to read the file and use 
  127. the data (Figure 3).
  128.  
  129.     Chest Net provides options for creating, adding to, or replacing 
  130. data in a Pair File which it then stores on the system disk.  Chest 
  131. Net can provide a list of diseases already in the Pair file (Figure 
  132. 4).  It can then load the data of a specific disease from the Pair 
  133. file back into itself so that the user can see what boxes were 
  134. checked off originally.  It can make NeuroPro train itself (i.e., 
  135. generate a network) using the Pair file.  Once the network has been 
  136. trained, Chest Net can be used to transmit an "unknown" from an 
  137. actual patient to the network to get a diagnosis.  Finally, there is 
  138. even an option to view representative images (Figure 5).
  139.  
  140.  
  141.  
  142.  
  143.  
  144. So, how do you use it?
  145.  
  146.  
  147.  
  148.     Well presumably as the "expert," I would be the one to define 
  149. what is seen in tuberculosis, sarcoid, asbestos disease, etc. and 
  150. then I would train the network.  You, as a user, would check the 
  151. boxes corresponding to your "unknown" chest x-ray and then push the a 
  152. button to get NeuroPro's opinion.  As a user, you could still modify 
  153. the Pair file in case your opinion of what congestive heart failure 
  154. looks like is different than mine.  You could also add to the Pair 
  155. file diseases I chose not to include.  If you do make changes, you 
  156. will have to train the network all over again.  This is a time 
  157. consuming operation even with an Amiga with a Motorola 68040 CPU.
  158.  
  159.  
  160.  
  161.  
  162.  
  163. Well, does it work?
  164.  
  165.  
  166.  
  167.     Not only does it work, but it has worked well enough to amaze 
  168. those I have shown it to.  The "unknowns" do have to be similar to 
  169. the diseases in the Pair file or else NeuroPro's output becomes a 
  170. gibberish of letters and characters.
  171.  
  172.  
  173.  
  174. Are there limitations?
  175.  
  176.  
  177.  
  178.     There are definite limitations.  Some of these are related to the 
  179. complexity of Radiology while others are inherent in neural networks 
  180. or in this Amiga implementation of them.
  181.  
  182.  
  183.  
  184.     First, neural networks are limited by the expertise of the person 
  185. who provides the training data (i.e., the Pair file).  Ultimately, 
  186. computers are no smarter than we are.  If I don't know the typical 
  187. radiographic appearance of PCP pneumonia, then neither will Chest 
  188. Net.
  189.  
  190.  
  191.  
  192.     Second, there may be (and often are!) a variety of radiographic 
  193. presentations for the same disease.  A patient with PCP pneumonia 
  194. can, for example, have a perfectly normal looking chest x-ray!  Such 
  195. patients will usually, however, have abnormal gallium scans, abnormal 
  196. arterial blood gas values, positive findings on lung washings 
  197. performed via bronchoscopy and problems with their immune systems.  
  198. If such possibilities are considered in Chest Net, multiple 
  199. presentations of the same disease could be entered as distinct 
  200. entities and be given labels like PCP.1, PCP.2, etc.
  201.  
  202.  
  203.  
  204.     Third, just as one disease can have multiple presentations, 
  205. several diseases can have essentially the same radiographic pattern.  
  206. Indeed, this turns out to be quite common and the radiologist is then 
  207. unable to give a specific diagnosis.  Rather, only a list of 
  208. diagnostic possibilities can be given with some possibilities more 
  209. likely than others, depending on other factors.  Sometimes clinical 
  210. history is helpful.  Does the patient have a fever?  Was the 
  211. abnormality present throughout the patient's life?  If we provide a 
  212.  
  213.  
  214.  
  215. "clinical history" selector with these possibilities given as 
  216. options, we may be able to handle this complication.  However, 
  217. sometimes even knowing the clinical history will not permit a 
  218. specific diagnosis.  Yet this is what we are usually asking the 
  219. neural network to do.
  220.  
  221.  
  222.  
  223.     My fourth point would be that each x-ray is a moment in time.  
  224. Knowing what the previous radiograph looked like is very important.  
  225. Is the patient improving on antibiotics or is a "water pill" making 
  226. the x-ray better?  Of course, we could allow for the results of prior 
  227. studies in the program but .....
  228.  
  229.  
  230.  
  231.     ... and this brings me to my fifth point.  Thirty-two descriptors 
  232. for all chest diseases, is really a rather small number to be 
  233. restricted to.  To describe a chest radiograph adequately, we could 
  234. easily justify a number 2 or 3 times larger.  One solution might be 
  235. what I call an "adaptive neural network system".  By this I mean that 
  236. selection of certain boxes in Chest Net could, in fact, lead to a 
  237. variant set of questions -- and a different network -- thereby 
  238. greatly extending the 32 character limitation.  So, if you selected 
  239. "Newborn" under the "Age Group" Selector, you might see different 
  240. questions than if you had selected "Adult."
  241.  
  242.  
  243.  
  244.     Finally, there is no way, at least in this version of NeuroPro, 
  245. to "weight" any of the 32 inputs so that some are more important than 
  246. others.  Suppose, that a certain disease only occurs in women.  There 
  247. is no sense in allowing NeuroPro to suggest as a diagnosis a disease 
  248. that only occurs in men!  Thus the sex of the patient may be 
  249. absolutely irrelevant for one disease and be totally determining in 
  250. another with everything in the middle being possible.  There is no 
  251. smooth way that I see for doing this in NeuroPro at this time.
  252.  
  253.  
  254.  
  255.  
  256.  
  257. So what is the bottom line?
  258.  
  259.  
  260.  
  261.     The bottom line, is that Chest Net is potentially useful, 
  262. providing we recognize its limitations.  A busy radiologist is 
  263.  
  264.  
  265.  
  266. probably not going to have either the time or the need to consult a 
  267. neural network for most cases.  There will always be challenging 
  268. radiographs and it may be useful to find out what the computer has to 
  269. say especially if a colleague is unavailable.
  270.  
  271.  
  272.  
  273.     The situation with radiology residents in training may be  
  274. different.  If nothing else, Chest Net is organized and thorough.  
  275. One resident felt that it could help him become more structured in 
  276. his approach to a chest film and less likely to miss findings.
  277.  
  278.  
  279.  
  280.     Perhaps, I am the one after all who got the most out of Chest Net 
  281. because writing it forced me to think about how I think and what I 
  282. teach.  Being forced to 32 descriptors, I was compelled to 
  283. concentrate on crucial factors that can make or break a diagnosis.
  284.  
  285.  
  286.  
  287.     Finally, it is worthwhile remembering that a patient is a person 
  288. while an x-ray is just an image.  Consequently, one never treats an 
  289. x-ray abnormality, only a patient.  If an x-ray provides unusual or 
  290. unexpected results, the x-ray is repeated to exclude the possibility 
  291. of artefact.  Experience, good judgement and empathy.  Now how can I 
  292. use AREXX to program that?
  293.  
  294.  
  295.  
  296.